package com.zzt.saleDesign;

public abstract class Decorator extends Sale{
    private Sale sale;  //可以传入Cake的任意一个子类对象，也可以是具体的装饰类型（卡片、鲜花）
    public Decorator() {}
    public Decorator(Sale sale) {
        this.sale = sale;
    }

    @Override
    public double discount(double price) {
        return sale.discount(price);
    }
}
